from sqlalchemy import Column, Integer, String, DateTime
from config.database import Base
from datetime import datetime


class CarTrack(Base):
    """
    参数配置表
    """
    __tablename__ = 'cms_car_track'

    id = Column(Integer, primary_key=True, autoincrement=True, comment='主键')
    car_id = Column(String(100), nullable=True, default='', comment='车辆编码')
    device_id = Column(String(100), nullable=True, default='', comment='设备编码')
    type = Column(String(500), nullable=True, default='', comment='类型 经纬度')
    position = Column(String(500), nullable=True, default='', comment='位置')
    record_time = Column(DateTime, nullable=True, comment='记录时间')
    create_by = Column(String(64), nullable=True, default='', comment='创建者')
    create_time = Column(DateTime, nullable=True, default=datetime.now(), comment='创建时间')
    update_by = Column(String(64), nullable=True, default='', comment='更新者')
    update_time = Column(DateTime, nullable=True, default=datetime.now(), comment='更新时间')